ByteData

public final static ByteData ByteData(ByteArray data, ContentType contentType)
public final static ByteData ByteData(ByteArray data, ContentType contentType)

Creates a new instance of ByteData with the given parameters.

Since

8.0.0

Parameters

data

The upload data as bytes.

contentType

The content type.


public final static ByteData ByteData(String data, Charset charset, ContentType contentType)
public final static ByteData ByteData(String data, Charset charset, ContentType contentType)

Creates a new instance of ByteData with the given parameters.

Since

8.0.0

Parameters

data

The upload data as a string.

charset

The charset used to encode data into a sequence of bytes.

contentType

The content type.